// Includesion guard start
#ifndef GFX_H
#define GFX_H

#include <SDL/SDL.h>
#include <SDL/SDL_image.h>
#include <stdio.h>
#include "typedefs.h"


/** @brief Loads an image using IMG_Load.
  *
  * @return pointer to the loaded image
  */
SDL_Surface* gfx_loadImage(const char*);

/** @brief Applies a surface.
  *
  * @param x x-coordinate of destination surface
  * @param y y-coordinate of destination surface
  * @param source source surface pointer
  * @param destination destination surface pointer
  * @param clip clipping of the surface
  */
void gfx_applySurface(u32 x, u32 y, SDL_Surface* source, SDL_Surface* destination, SDL_Rect* clip=NULL);

/** @brief Resizes a surface.
  *
  * @param surface surface to resize
  * @param newWidth new width
  * @param newHeight new height
  */
void gfx_resizeSurface(SDL_Surface* surface, u16 newWidth, u16 newHeight);

/** @brief Creates a duplicate of a surface with transformed colors.
  *
  * Format:
	even elements:Pixel color to be transformed.
  *
  * @param source surface pointer
  * @param transformArray array containing information of how to transform. Length of array
	should be a multiple of 2.
  * @param iterations how many colors to transform
  *
  * @return pointer to the new surface
  */
SDL_Surface* gfx_createColorTransformedSurface(SDL_Surface* source, u32* transformArray, u16 iterations);

// Inclusion guard end
#endif
